package com.jxmcloud.business.cut.service.database;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jxmcloud.business.cut.dto.client.UserActivityInfoDto;
import com.jxmcloud.business.cut.model.database.DBUserActivityInfo;
import com.jxmcloud.business.cut.model.query.UserActivityInfoQuery;
import com.jxmcloud.business.cut.vo.UserActivityInfoVo;

import java.util.List;

public interface IUserActivityInfoDBService extends IService<DBUserActivityInfo> {
    /**
     * 基本数据插入
     *
     * @param info
     * @return
     */
    boolean insertIntoData(DBUserActivityInfo info);

    // 基本数据查找
    DBUserActivityInfo selectOne(Integer uid, Integer activityId, Integer status);

    // 批量查找
    List<DBUserActivityInfo> selectAll(Integer uid, Integer activityId);

    // 数据删除
    boolean deleteData(Integer uid);

    // 基本数据修改
    boolean updateData(DBUserActivityInfo info);

    // ================================= =
    // 更新 startId, activityId
//    boolean updateStartIdActivityId(Long uid, Integer activityId, Integer startId);

    // 更新 新用户邀请数
    boolean updateNewsCount(Integer uid, Integer activityId, Integer newsCount);

    /**
     * 更新分享成功次数
     * @param uid
     * @param activityId
     * @param shareCount
     * @return
     */
    boolean updateShareCount(Integer uid, Integer activityId, Integer shareCount);

    /**
     * 更新有效时间开始时间
     * @param uid
     * @param activityId
     * @param beganTime
     * @return
     */
    boolean updateBeganTime(Integer uid, Integer activityId, Integer beganTime);



    // 更新通知列表
    boolean updateNoticeList(Integer uid, Integer activityId, Integer[] noticeList);

    DBUserActivityInfo selectByUidAndActivityIdOnDoing(Integer uid);

    IPage<UserActivityInfoVo> getCutActivityPage(UserActivityInfoQuery query);

    void updateUserActivityInfoForWeb(UserActivityInfoDto dto);

    void deleteUserActivityInfo(Integer id);


    DBUserActivityInfo selectByActivityStartId(Integer uid,Integer activityId, Integer activityStartId);

    // 根据uid批量查找
    List<DBUserActivityInfo> selectAllByUid(Integer uid);
}
